home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / extra / pro13 / t.bat < prev    next >
DOS Batch File  |  1993-08-29  |  3KB  |  83 lines

  1. @echo off
  2.  
  3. echo =================
  4. echo       T.BAT
  5. echo TSR Build Utility
  6. echo    Version 1.5
  7. echo =================
  8.  
  9. if %1.==. goto syntax
  10.  
  11. set filename=%1
  12. set tsrargs=
  13. shift
  14.  
  15. :next
  16. if %1.==. goto compile
  17. set tsrargs=%tsrargs% %1
  18. shift
  19. goto next
  20.  
  21. :compile
  22. bcc -mt -S -I%ti% %filename%.c
  23. if errorlevel 1 goto badexit
  24.  
  25. filter %filename%
  26. if errorlevel 1 goto badexit
  27.  
  28. tsr %tsrargs% %filename%
  29. if errorlevel 1 goto badexit
  30.  
  31. tasm %filename%
  32. if errorlevel 1 goto badexit
  33.  
  34. tlink /t %filename%
  35. if errorlevel 1 goto badexit
  36.  
  37. echo TSR build successful.
  38. goto exit
  39.  
  40. :badexit
  41. echo TSR build unsuccessful.
  42. goto exit
  43.  
  44. :syntax
  45. echo "-------------------------------------------------------------------"
  46. echo "t.bat - TSR Build Utility                                          "
  47. echo "                                                                   "
  48. echo "Command-line format:                                               "
  49. echo "                                                                   "
  50. echo "t tsrspec options                                                  "
  51. echo "                                                                   "
  52. echo "options = map | [hotkey] [include] [setup_cleanup] [stack] [xparse]"
  53. echo "                                                                   "
  54. echo "map = ("/"|"-") "m"                                                "
  55. echo "hotkey = ("/"|"-") "h" x                                           "
  56. echo "include = ("/"|"-") "i"                                            "
  57. echo "setup_cleanup = ("/"|"-") "sc"                                     "
  58. echo "stack = ("/"|"-") "s" y                                            "
  59. echo "xparse = ("/"|"-") "x"                                             "
  60. echo "                                                                   "
  61. echo "x is either "A"-"Z" or "0"-"9" (default is T)                      "
  62. echo "y is a byte value from 256 to 8192 (default is 256)                "
  63. echo "tsrspec defines the .TSR file to be TSRed                          "
  64. echo "                                                                   "
  65. echo "You may specify a search path for include files by setting environ-"
  66. echo "ment variable TI to this path.  By default, BCC can locate standard"
  67. echo "include files (DOS.H, STDLIB.H, etc.) but will need help in finding"
  68. echo "others.  This is where TI comes in.  Suppose C:\BORLANDC\TSR is the"
  69. echo "location of TSR specific include files.  The following SET can help"
  70. echo "BCC find these files.                                              "
  71. echo "                                                                   "
  72. echo "SET TI=C:\BORLANDC\TSR                                             "
  73. echo "                                                                   "
  74. echo "BCC will search C:\BORLANDC\TSR for all include files not in either"
  75. echo "the current or standard directories.                               "
  76. echo "                                                                   "
  77. echo "Example: t sample -hs -s350                                        "
  78. echo "-------------------------------------------------------------------"
  79.  
  80. :exit
  81. set filename=
  82. set tsrargs=
  83.